package com.ruoyi.system.service;

import java.util.List;

import com.alibaba.dashscope.exception.ApiException;
import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import com.ruoyi.system.domain.SysAiChat;

/**
 * AI智能问答记录Service接口
 * 
 * @author sxy
 * @date 2025-04-16
 */
public interface ISysAiChatService 
{
    /**
     * 查询AI智能问答记录
     * 
     * @param chatId AI智能问答记录主键
     * @return AI智能问答记录
     */
    public SysAiChat selectSysAiChatByChatId(Long chatId);

    /**
     * 查询AI智能问答记录列表
     * 
     * @param sysAiChat AI智能问答记录
     * @return AI智能问答记录集合
     */
    public List<SysAiChat> selectSysAiChatList(SysAiChat sysAiChat);


    /**
     * 批量删除AI智能问答记录
     *
     * @param chatIds 需要删除的AI智能问答记录主键集合
     * @return 结果
     */
    public int deleteSysAiChatByChatIds(Long[] chatIds);

    /**
     * 删除AI智能问答记录信息
     *
     * @param chatId AI智能问答记录主键
     * @return 结果
     */
    public int deleteSysAiChatByChatId(Long chatId);

    /**
     * 发起提问
     * @param request
     * @return
     */
    String getAIResponse(String request)throws ApiException, NoApiKeyException, InputRequiredException;
}
